package com.zitangkou.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zitangkou.common.enums.StatusEnum;
import com.zitangkou.common.global.UserContent;
import com.zitangkou.user.info.PermissionInfo;
import com.zitangkou.user.req.permission.AddPermissionReq;
import com.zitangkou.user.req.permission.GetPermissionByPageReq;
import com.zitangkou.user.req.permission.ModifyPermissionReq;
import com.zitangkou.user.resp.permission.PermissionActionResp;

import java.util.List;

/**
 * 权限
 *
 * @author Deng Ningning
 * @version 1.0
 * @date 2020/8/31 16:39
 */
public interface IPermissionService {

    /**
     * 分页查询权限列表
     *
     * @param req
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.zitangkou.user.model.info.PermissionInfo>
     * @date 2021/2/27 11:24
     */
    IPage<PermissionInfo> getPermissionPage(GetPermissionByPageReq req);

    /**
     * 添加权限
     *
     * @param req
     * @param userContent
     * @return boolean
     * @author Deng Ningning
     * @date 2020/9/2 11:56
     */
    boolean addPermission(AddPermissionReq req, UserContent userContent);

    /**
     * 修改权限
     *
     * @param req
     * @param userContent
     * @return boolean
     * @date 2021/2/27 13:01
     */
    boolean modifyPermission(ModifyPermissionReq req, UserContent userContent);

    /**
     * 删除权限
     *
     * @param permissionId
     * @param statusEnum
     * @param userContent
     * @return boolean
     * @date 2021/2/27 13:02
     */
    boolean updatePermissionStatus(String permissionId, StatusEnum statusEnum, UserContent userContent);

    /**
     * 查询权限详情
     *
     * @param permissionId
     * @return com.zitangkou.user.model.entity.PermissionDo
     * @date 2021/2/27 13:01
     */
    PermissionInfo getPermissionById(String permissionId);

    /**
     * 查询权限所有操作列表
     *
     * @return java.util.List<com.zitangkou.user.model.resp.user.UserLoginActionResp>
     * @author Deng Ningning
     * @date 2020/12/24 15:58
     */
    List<PermissionActionResp> getPermissionActions();

}
